/PROG  PNS0042
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53332389_90C";
PROG_SIZE	= 3502;
CREATE		= DATE 15-04-11  TIME 18:15:00;
MODIFIED	= DATE 25-02-25  TIME 21:44:28;
FILE_NAME	= PNS0017;
VERSION		= 0;
LINE_COUNT	= 122;
MEMORY_SIZE	= 3966;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0042 ;
   7:  !  PART:53332389/90  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED]=10    ;
  24:  OVERRIDE=R[5:SPEED] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  R[5:SPEED]=60    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED] ;
  56:J P[3:PICK APPROACH] 100% CNT80 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT0 ACC100 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:   ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  72:   ;
  73:  TIMER[3]=STOP ;
  74:  LBL[40:AT DROP POUNCE] ;
  75:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  76:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  77:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  78:  JMP LBL[40] ;
  79:   ;
  80:  LBL[50:MOVE DROP SNEAK] ;
  81:  TIMER[3]=START ;
  82:  OVERRIDE=R[5:SPEED] ;
  83:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  84:  LBL[51:DROP OR C-P-S] ;
  85:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  86:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  87:  JMP LBL[51] ;
  88:  JMP LBL[50] ;
  89:   ;
  90:  LBL[60:MOVE CLS-PRS-ACC] ;
  91:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  92:  PAUSE ;
  93:  JMP LBL[30] ;
  94:   ;
  95:  LBL[80:DROP ENABLED] ;
  96:  TIMER[3]=START ;
  97:  !PROCEED TO DROP ;
  98:J P[10:DROP APPROACH] 100% CNT0 ACC100    ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP_L ACC100 BREAK    ;
 101:J P[14] 100% FINE    ;
 102:   ;
 103:J P[6] 60% CNT10 TB R[19]sec,CALL PARTDROP_R ACC100 BREAK    ;
 104:   ;
 105:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 106:  PAYLOAD[3] ;
 107:  CALL CHK_DROP    ;
 108:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 109:  CALL CHK_DROP    ;
 110:J P[13:DROP CLEAR] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 111:  !GOTO PICK POUNCE ;
 112:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 113:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 114:  JMP LBL[10] ;
 115:   ;
 116:  LBL[90:END OF CYCLE] ;
 117:  TIMER[1]=STOP ;
 118:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 119:J P[1:MIDDLE] 50% CNT100    ;
 120:  MOVE TO HOME    ;
 121:   ;
 122:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -830.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.358  mm,	Y =  1398.760  mm,	Z =  -899.840  mm,
	W =   179.321 deg,	P =     1.370 deg,	R =   150.805 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2571.520  mm,	Y =  3273.259  mm,	Z =  -999.233  mm,
	W =   179.579 deg,	P =    -1.093 deg,	R =    88.592 deg,
	E1=   195.525 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2571.521  mm,	Y =  3273.260  mm,	Z = -1078.193  mm,
	W =   179.579 deg,	P =    -1.093 deg,	R =    88.592 deg,
	E1=   195.525 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2571.520  mm,	Y =  3273.259  mm,	Z =  -974.513  mm,
	W =   179.579 deg,	P =    -1.093 deg,	R =    88.592 deg,
	E1=   195.525 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2647.541  mm,	Y = -3268.170  mm,	Z =  -973.211  mm,
	W =  -177.869 deg,	P =      .582 deg,	R =   -91.111 deg,
	E1=    14.909 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2565.555  mm,	Y =  1976.170  mm,	Z =  -966.897  mm,
	W =   179.297 deg,	P =    -1.002 deg,	R =    93.532 deg,
	E1=   190.719 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2147.562  mm,	Y =  -910.042  mm,	Z =  -850.000  mm,
	W =  -179.558 deg,	P =     1.105 deg,	R =  -148.857 deg,
	E1=    75.730 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2297.629  mm,	Y = -1689.229  mm,	Z =  -945.748  mm,
	W =  -178.781 deg,	P =     1.304 deg,	R =  -132.954 deg,
	E1=    59.375 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2656.619  mm,	Y = -3252.145  mm,	Z =  -872.818  mm,
	W =   178.782 deg,	P =      .516 deg,	R =   -91.142 deg,
	E1=    14.910 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2656.646  mm,	Y = -3252.091  mm,	Z =  -956.652  mm,
	W =   176.357 deg,	P =      .468 deg,	R =   -91.164 deg,
	E1=    14.909 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2656.620  mm,	Y = -3252.145  mm,	Z =  -872.818  mm,
	W =   178.782 deg,	P =      .516 deg,	R =   -91.142 deg,
	E1=    14.910 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2297.630  mm,	Y = -1689.229  mm,	Z =  -945.748  mm,
	W =  -178.781 deg,	P =     1.304 deg,	R =  -132.954 deg,
	E1=    59.375 deg
};
P[14]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2656.619  mm,	Y = -3252.145  mm,	Z =  -872.818  mm,
	W =   178.782 deg,	P =      .516 deg,	R =   -91.142 deg,
	E1=    14.910 deg
};
/END
